Skip to main content
This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

Notes/Domino 6 and 7 Forum

Notes/Domino 6 and 7 Forum


PreviousPrevious NextNext

~George Minkrozenjip 22.Jan.04 05:12 PM a Web browser
Domino Designer All Releases All Platforms


I'm trying to transform a xml page to display documents on the web. I'm using example from the Sandbox (Acme Auto Parts). I changed the reference to display my page and my stylesheet, but it's always values from acme database that are showing??? can't figured out... here is my code :

//Defines HTMLresults as a variable
var HTMLresults;
//Defines source as a variable
var source;
//Defines style as a variable
var style;

//Defines loadXML() as a function
function loadXML() {
//Creates a new ActiveXObject called source which is the Microsoft.XMLDOM parser that is part of IE 5.5
source = new ActiveXObject("Microsoft.XMLDOM");
//Creates a new ActiveXObject called style which is the Microsoft.XMLDOM parser that is part of IE 5.5
style = new ActiveXObject("Microsoft.XMLDOM");

source.async = false;
style.async = false;
//Sets the validateOnParse property to false
source.validateOnParse = false;

//Loads the GetParts page into the parser using the openPage URL command
//Loads the acmepartscatalog.xsl stylesheet into the parser using the openPage URL command
//Error handler. If there is an error, call the showError() function
if(source.parseError.errorCode != 0) {
//If there is no error, call the doTransform() function

//Defines doTransform() as a function
function doTransform() {
//If the getReadyState() function returns true, then transform the node using the stylesheet and put the results into the tags with the HTMLresults attribute.
if (getReadyState()){
resulting = source.transformNode(style);
document.all.item("HTMLresults").innerHTML = resulting;
//If the getReadyState() function doesn't return true, then refresh.

//Defines the getReadyState function
function getReadyState() {
// alert("ready state: " + source.readyState);
if (source.readyState == 4) {
return true;
setTimeout("getReadyState()", 100);

//Defines the showError() function
function showError() {
var strError = new String;
var err = source.parseError;
strError = 'Error!\n' +
'file url: '+err.url +' \n'+
'line no.:'+err.line +'\n'+
'char: '+ err.linepos + '\n' +
'source: '+err.srcText+'\n'+
'code: '+err.errorCode+'\n'+
'description: '+err.reason+'\n';
document.all.item("HTMLresults").innerHTML = strError;

Someone can help me? Why is it always loading wrong stylesheet and documents???
Thanks in advance,

XML - JavaScript Transformation que... (~George Minkroz... 22.Jan.04)
. . RE: XML - JavaScript Transformation... (~George Minkroz... 22.Jan.04)

  Document options
Print this pagePrint this page

 Search this forum

  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Advanced search

 RSS feedsRSS
All forum posts RSS
All main topics RSS